package com.supplychain.scm.core.task.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName BaseTaskResult
 * @Description 异步任务出参公共基类
 * @createTime 11:09:00 2023/04/15
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class BaseTaskResult implements Serializable {

    /**
     * 执行数量
     */
    private Integer taskCount;

    /**
     * 成功数量
     */
    private Integer successTaskCount;

    /**
     * 失败数量
     */
    private Integer failTaskCount;

    /**
     * 子任务
     */
    private List<BaseTaskResult.SubTask> subTasks;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SubTask {
        /**
         * 文件名称
         */
        private String fileName;

        /**
         * 导入文件url
         */
        private String importFileUrl;

        /**
         * 导入数量
         */
        private Integer importCount;
    }
}
